1. Field of the Invention
The present invention relates to virtualization, specifically, replicating schedules for Universal Serial Bus (USB) devices for virtualization.
2. Description of the Related Art
Virtualization is a technique in which a computer system is partitioned into multiple isolated virtual machines (VMs), each of which appears to the software within it to be a complete computer system. The software running within each VM—including the operating system in the VM—may be unaware of any of the other VMs, or even that the computer system is partitioned. The virtual machine monitor (VMM) is responsible for providing the environment in which each VM runs and maintaining isolation between the VMs. FIG. 1 shows an example of a typical virtualized computer system.
Each virtual machine has access to a set of devices, which may be virtual devices or physical devices. These devices include controllers for secondary busses. The VMM controls which physical devices/controllers are assigned to each VM, and also implements the virtual devices are visible to VMs. If a physical device is exclusively assigned to a single virtual machine, it is not available to the other virtual machines. In current practice, if a device needs to be shared by more than one VM, the VMM typically implements a virtual device for each VM, and arbitrates access of the virtual devices to the physical device. The implementation of the virtual devices and the arbitration of access to the physical device adds overhead and reduces the performance of both the computer system and the device. Also, the virtual device typically defines a different more limited interface and functionality than the physical device.
USB 2.0 (Universal Serial Bus Revision 2.0 Specification, published 2002) is an external bus that supports data rates of up to 480 Mbps. USB 2.0 is an extension of USB 1.1 (Universal Serial Bus Revision 1.1 Specification, published 1996) and is fully compatible with USB 1.1. Current virtualization software solutions provide limited support for USB 2.0. For example, existing virtualization software solutions do not support isochronous devices nor do they support more than two devices on USB 2.0 per VM.
In the case of USB, the VMM may wish to assign individual USB devices to specific VMs, to avoid the problems associated with virtualizing the USB devices. However, the USB host controller is used to communicate with all connected USB devices, so it cannot be assigned to any single VM. The host controller must be virtualized in a way that allows each VM to use it to communicate with the USB devices assigned to that VM.
However, a problem arises for USB virtualization. Each virtual machine (VM) has its own USB schedule. In contrast, the USB controller adheres to a single schedule. Therefore, the problem arises of dealing with multiple schedules of the respective VMs. Present commercial software solutions offer limited or no support for USB Host Controller virtualization. For example, some solutions present UHCI (USB 1.1) controllers to guest operating systems (with no EHCI virtualization) and only allow two devices per virtual machine. Thus, current products do not implement hub virtualization and do not allow for isochronous devices. Further, current solutions are software only solutions.
FIG. 2 is prior art and shows the software stack, the USB host controller, and their interactions. Specifically, FIG. 2 shows that the software includes an operating system (OS) 231 which includes various components including drivers and schedulers, specifically a client driver 241, a root hub driver 251, a USB driver 261, a host controller (HC) driver 271, and a peripheral component interconnect (PCI) bus driver 291. In addition, a memory schedule 281 is present.
Table 1 is a set of replicated registers as utilized by one embodiment of the claimed subject matter.
Table 2 is a set of operational registers as utilized by one embodiment of the claimed subject matter.